package cn.neusoft.mapper;

import cn.neusoft.domain.Commodity;
import cn.neusoft.query.BaseQuery;
import feign.Param;

import java.math.BigInteger;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


public interface CommodityMapper {

    void add(Commodity commodity);
    List<Commodity> getAll();

    void update(Commodity commodity);
    void delete(String id);

    Commodity getById(@Param("commodity_id") String commodity_id);

    List<Commodity> getByName(String name);

    List<Commodity> getCommoditiesByPage(@Param("start") int start, @Param("pageSize") int pageSize);

    int getTotalCount();

    // 添加根据商品名字返回所在仓库的名字和商品在该仓库内的数量的方法
    List<Commodity> getCommoditiesWithWarehouseInfoByName(@Param("name") String name);

    List<Commodity> findByPage(BaseQuery query);

    void addCommodityWarehouse(Map params);
}
